<form class="bs-example form-horizontal form-validation" name="form">
    <div class="modal-body form-horizontal form">
        <div class="form-body portlet light">
            <div class="portlet-title clearfloat" style="padding-bottom:10px;border-bottom:1px solid #ececec;">
                <div class="caption font-green-sharp" style="display:inline-block;float:left;">
                    <i class="fa fa-plus"></i>
                    <span class="caption-subject bold uppercase">{{editData?(formDisabled?'查看':'编辑'):'新增'}}商品</span>
                </div>
                <div class="tools" style="float:right; cursor:pointer;">
                    <i class="fa fa-close" ng-click="cancel()"></i>
                </div>
            </div>
            <div class="portlet-body">
                <div class="form-body" style="padding:15px;">
                    <div class="row">
                        <div class="col-md-12  margin-top-15">
                            <!-- form start -->
                            <div class="form-group">
                                <label class="col-lg-2 control-label">商品缩略图：</label>
                                <div class="col-lg-3" ng-show="!formDisabled">
                                    <input type="file" class="form-control" style="border:none"
                                           ngf-select="upload($file,'goodsThumb')"
                                           ngf-pattern="'image/*'" ngf-accept="'image/*'" >
                                    </input>
                                </div>
                                <div class="col-lg-3">
                                    <a href="javascript:;" ng-if="info.goodsThumb" ng-click="removeImg('goodsThumb')"
                                       style="color:#FFFFFF;border-radius:2px;position:absolute;top:0px;background-color: red;">删除</a>
                                    <img class="img-thumbnail" style="max-height:100px;" ng-click="showImg($event)"
                                         ng-src="{{info.goodsThumb || 'img/thumb.jpg'}}"/>
                                </div>
                            </div>
                            <div class="form-group" >
                                <label class="col-lg-2 control-label">商品展示图：</label>
                                <div class="col-lg-3" ng-show="!formDisabled">
                                    <input type="file" class="form-control" style="border:none"
                                           ngf-select="uploadMulti($files)" name="files" ngf-multiple="true"
                                           ngf-pattern="'image/*'" ngf-accept="'image/*'" >
                                    </input>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label"></label>
                                <div class="col-lg-2" ng-if="!(goodsImgs.length)">
                                    <img class="img-thumbnail" style="width:100%;" ng-click="showImg($event)"
                                         ng-src="img/thumb.jpg"/>
                                </div>
                                <div class="col-lg-2" ng-repeat="goodsImg in goodsImgs">
                                    <a href="javascript:;" ng-click="removeMultiImg('goodsImgs',$index)"
                                       style="color:#FFFFFF;border-radius:2px;position:absolute;top:0px;background-color: red;">删除</a>
                                    <img class="img-thumbnail" style="width:100%;" ng-click="showImg($event)"
                                         ng-src="{{goodsImg}}"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label">商品名称：</label>
                                <div class="col-lg-4">
                                    <input type="text" class="form-control" ng-model="info.name" ng-disabled="formDisabled"
                                           required>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label">商品分类：</label>
                                <div class="col-lg-4">
                                    <ui-select ng-model="info.categoryId" theme="bootstrap" ng-disabled="disabled" style="min-width: 300px;" >
                                        <ui-select-match>{{$select.selected.value}}</ui-select-match>
                                        <ui-select-choices group-by="'group'"
                                                           repeat="item in categories | propsFilter: {value: $select.search}">
                                            <div ng-bind-html="item.value | highlight: $select.search"></div>
                                        </ui-select-choices>
                                    </ui-select>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-lg-2 control-label">商品金额：</label>
                                <div class="col-lg-4">
                                    <input ui-jq="TouchSpin" type="text" ng-model="info.promotePrice" class="form-control" data-min='0' data-max="10000000" ng-disabled="formDisabled"
                                           data-step="0.01" data-decimals="2" data-postfix="元">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-lg-2 control-label">商品原价：</label>
                                <div class="col-lg-4">
                                    <input ui-jq="TouchSpin" type="text" ng-model="info.shopPrice" class="form-control" data-min='0' data-max="10000000" ng-disabled="formDisabled"
                                           data-step="0.01" data-decimals="2" data-postfix="元">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-lg-2 control-label">商品条码：</label>
                                <div class="col-lg-4">
                                    <input type="text" class="form-control"  ng-model="info.goodsSn" ng-disabled="formDisabled"
                                           required>
                                </div>
                            </div>

                            <!--<div class="form-group">
                                <label class="col-lg-2 control-label">商品库存：</label>
                                <div class="col-lg-4">
                                    <input type="number" class="form-control" ng-model="info.goodsNumber"  ng-disabled="formDisabled" required  />
                                </div>
                            </div>-->

                            <div class="form-group">
                                <label class="col-lg-2 control-label">商品规格：</label>
                                <div class="col-lg-4">
                                    <input type="text" class="form-control" ng-model="info.standard" ng-disabled="formDisabled"
                                           required>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-lg-2 control-label">详细描述：</label>
                                <div class="col-lg-4">
                                    <textarea class="form-control" ng-model="info.description" ng-disabled="formDisabled" required></textarea>
                                </div>
                            </div>
                            <!-- form end -->
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="modal-footer">
        <button class=" btn btn-primary " type="submit" ng-show="!editData||!formDisabled" ng-click="submitApply()">确定</button>
        <button class=" btn  btn-warning" type="button" ng-click="cancel()">关闭</button>
    </div>



</form>